home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / screen / splash / splashde.bas < prev    next >
BASIC Source File  |  1996-01-19  |  1KB  |  39 lines

  1. Attribute VB_Name = "Module1"
  2. '**************************************************
  3. 'This demo is FREEWARE and may be distributed, as *
  4. 'long as it is FREE to all.  You may use the code *
  5. 'and any parts of this in your application. Demo  *
  6. 'provided by Jim Dompier 73501,445, thanks to     *
  7. 'Craig H. Clearman and KMK Mohan @ NetQuest for   *
  8. 'their help with the "on top" code.....           *
  9. '**************************************************
  10.   
  11.  
  12.  'In the .bas file add this code for always on top
  13.  Public Const SWP_NOSIZE = &H1
  14.  Public Const SWP_NOMOVE = &H2
  15.  Public Const HWND_TOPMOST = -1
  16.  Public Const SWP_SHOWWINDOW = &H40
  17.  
  18.  'For VB4.0 32 bit.
  19.  Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
  20.  
  21.   'For VB4.0 16 bit
  22.  'Declare Sub SetWindowPos Lib "User" (ByVal hWnd As Integer, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer)
  23.  
  24.  
  25. Sub Main()
  26. '**************************************************
  27. 'set your project so that it starts with Sub Main *
  28. 'rather than form1.                               *
  29. '**************************************************
  30.     'Load the splash screen, it will unload by
  31.     'the timer event of frmsplash
  32.     
  33.     frmSplash.Show
  34.  
  35.     'Load the application form
  36.      Form1.Show
  37.  
  38. End Sub
  39.